﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Security;

public partial class WebUserControls_WUCIngresarUsuario : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void btnCrear_Click(object sender, EventArgs e)
    {
        SimcMembershipProvider membership = (SimcMembershipProvider)Membership.Provider;

        MembershipCreateStatus status = MembershipCreateStatus.Success;
        Guid guid = Guid.NewGuid();
        //MembershipUser mem = membership.CreateUsuario(txtNombreUsuario.Text, guid.ToString(), txtCorreo.Text, "NULL", " NULL", true, null, out status, txtTelefono.Text);
        MembershipUser mem = membership.CreateUsuario(txtNombreUsuario.Text,
                                    "Ab_12345678",
                                    txtCorreo.Text,
                                    "NULL",
                                    " NULL",
                                    true,
                                    null,
                                    out status,
                                    txtTelefono.Text,
                                    txtNombre.Text,
                                    txtApellido.Text);

        lblMensaje.Text = status.ToString();
        //lblMensaje.Text +=" su contraseña es: "+guid.ToString(); 
        lblMensaje.Text += "Ab_12345678";
    }
}